import request from '@/utils/request'

// 查询走访列表
export function listCustomerVisit(query) {
  return request({
    url: '/crm/customerVisit/list',
    method: 'get',
    params: query
  })
}

// 查询走访详细
export function getCustomerVisit(visitId) {
  return request({
    url: '/crm/customerVisit/' + visitId,
    method: 'get'
  })
}




// 新增走访
export function addCustomerVisit(data) {
  return request({
    url: '/crm/customerVisit',
    method: 'post',
    data: data
  })
}

// 修改走访
export function updateCustomerVisit(data) {
  return request({
    url: '/crm/customerVisit',
    method: 'put',
    data: data
  })
}

// 删除走访
export function delCustomerVisit(visitId) {
  return request({
    url: '/crm/customerVisit/' + visitId,
    method: 'delete'
  })
}

// 导出走访
export function exportCustomerVisit(query) {
  return request({
    url: '/crm/customerVisit/export',
    method: 'get',
    params: query
  })
}


export function getNewVisit(query) {
  return request({
    url: '/crm/customerVisit/getNewVisit',
    method: 'get',
    params: query
  })
}